{% extends "private_messages/base_pm.html" %}
{% load i18n %}
{% load jalali_view %}

{% block title %}{% trans "Inbox" %}{% endblock %}
{% block page_title %}{% trans "Inbox" %}{% endblock %}

{% block pm_content %}

{% if message_list %}
<table>
	<thead>
		<tr>
			<th>{% trans "Sender" %}</th>
			<th>{% trans "Subject" %}</th>
			<th>{% trans "Received" %}</th>
			<th>{% trans "Action" %}</th>
		</tr>
	</thead>
	<tbody>
{% for message in message_list %}
	<tr>
		<td>{{ message.sender }}</td>
		<td>
			{% if message.new %}<strong>{% endif %}
			{% if message.replied %}<em>{% endif %}
			<a href="{{message.get_absolute_url }}">{{ message.subject }}</a>
			{% if message.replied %}</em>{% endif %}
			{% if message.new %}</strong>{% endif %}
		</td>
		<td>{% jalali_view message.sent_at%}</td>
		<td><a href="/pm/delete/{{  message.id }}/">{% trans "delete" %}</a></td>
	</tr>
{% endfor %}	
	</tbody>
</table>
{% else %}
<p>{% trans "No messages." %}</p>
{% endif %}
{% endblock pm_content %}
